<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link href="/erp/assets/css/bootstrap.min.css" rel="stylesheet"/>
    <link rel="stylesheet" href="/erp/css/style.css"/>
    <link rel="stylesheet" href="/erp/assets/css/ace.min.css"/>
    <link rel="stylesheet" href="/erp/assets/css/font-awesome.min.css"/>
    <link rel="stylesheet" href="/erp/Widget/zTree/css/zTreeStyle/zTreeStyle.css" type="text/css">
    <link href="/erp/Widget/icheck/icheck.css" rel="stylesheet" type="text/css"/>
    <!--[if IE 7]>
    <link rel="stylesheet" href="/erp/assets/css/font-awesome-ie7.min.css"/>
    <![endif]-->
    <!--[if lte IE 8]>
    <link rel="stylesheet" href="/erp/assets/css/ace-ie.min.css"/>
    <![endif]-->
    <script src="/erp/js/jquery-1.9.1.min.js"></script>
    <script src="/erp/assets/js/bootstrap.min.js"></script>
    <script src="/erp/assets/js/typeahead-bs2.min.js"></script>
    <!-- page specific plugin scripts -->
    <script src="/erp/assets/js/jquery.dataTables.min.js"></script>
    <script src="/erp/assets/js/jquery.dataTables.bootstrap.js"></script>
    <script type="text/javascript" src="/erp/js/H-ui.js"></script>
    <script type="text/javascript" src="/erp/js/H-ui.admin.js"></script>
    <script src="/erp/assets/layer/layer.js" type="text/javascript"></script>
    <script src="/erp/assets/laydate/laydate.js" type="text/javascript"></script>
    <script type="text/javascript" src="/erp/Widget/zTree/js/jquery.ztree.all-3.5.min.js"></script>
    <script src="/erp/js/lrtk.js" type="text/javascript"></script>


    <title>添加仓库预警</title>
</head>
<body>
<div class="add_menber" id="add_menber_style">
<form>
    <input type="hidden" name="id" th:value="${param.id}">
    <ul class=" page-content">
        <div class="Operate_cont clearfix">
            <label class="form-label"><span class="c-red"></span>仓库名称：</label>

            <div class="formControl ">
                <input type="text"  readonly="readonly" name="warehouse" th:value="${param.wname}">
            </div>
        </div>
        <div class="Operate_cont clearfix">
            <label class="form-label"><span class="c-red"></span>产品名称：</label>

            <div class="formControls ">
                <input type="text"  readonly="readonly" name="commodity" th:value="${param.pname}">
            </div>
        </div>
        <div class="Operate_cont clearfix">
            <label class="form-label"><span class="c-red"></span>当前产品预警值：</label>

            <div class="formControls ">
                <input type="text"  readonly="readonly" th:value="${param.hint}">
            </div>
        </div>
        <div class="Operate_cont clearfix">
            <label class="form-label"><span class="c-red"></span><i style="color: #f00">*</i>设置预警值：</label>
            <div class="formControls ">
                <input type="text" class="input-text" value="" placeholder="" id="hint" name="hint">
            </div>
        </div>
        <div class="" style=" text-align:center">
            <input class="btn btn-primary" id="tijiao" type="button" value="提交">
            <input class="btn btn-primary" id="tijiao1" type="reset" value="取消">
        </div>
    </ul>
</form>
</div>

<script>
    $("#tijiao").click(function () {
        var data=$('form').serialize();
        $.post("/hint/updateHint",data,function (res) {
            if(res.flag){
                layer.msg(res.message,{icon: 6,time:1000});
                var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
                $("#hidden",window.parent.document).click();
                console.log("ssssss");
                parent.layer.close(index); //再执行关闭
            }else {
                layer.msg(res.message,{icon: 5,time:1000});
            }
        })
    })
</script>
</body>
</html>